package org.example;

import org.example.Service.BookService;
import org.example.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

        BookDao bookDao =(BookDao) ctx.getBean("bookDao");
        BookService bookService =(BookService) ctx.getBean("bookService");
        bookDao.save();
        bookService.save();

    }
}